package cn.example.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author cyx
 * @since 2024-12-11
 */
@TableName("t_orders")
@Data  //生成getter、setter
@NoArgsConstructor  //无参构造
@AllArgsConstructor //全参构造
@ToString   //生成toString
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Orders implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "orderId", type = IdType.AUTO)
    private Integer orderId;

    /**
     * 订单字符串编号
     */
    private String orderNumber;

    /**
     * 所属用户编号
     */
    private Integer userId;

    /**
     * 所属商家编号
     */
    private Integer businessId;

    /**
     * 订购日期
     */
    private LocalDateTime orderDate;

    /**
     * 订单总价
     */
    private BigDecimal orderTotal;

    /**
     * 所属送货地址编号
     */
    private Integer addressId;

    /**
     * 订单状态（0：未支付；1：已支付）
     */
    private String orderState;

}
